#sinclude <iostream>

using namespace std;

int gcd(int m,int n);

int main( )
{
    int m,n;
    cout<<"please enter two different number"<<endl;
    cin>>m>>n;
    cout<<gcd(m,n)<<endl;

    cin>>n;
    return 0;
}

int gcd(int m,int n)
{
    int r;
    while(n!=0)
    {
         r=m%n;
         m=n;
         n=r;
    }

    return m;
}
